﻿namespace EMall.Cache
{
    public interface ICacheManager
    {
        CacheKeyCollection<string> Keys { get; } 
        Task<TItem> TryGetValueAsync<TItem>(string key, Func<Task<TItem>> factory);
        Task TryRefreshValueAsync<TItem>(string key, Func<Task<TItem>> factory);
    }
}